package mathgame.core;


import java.util.Observable;

public class GameState extends Observable {

    private String[] gameStateInfo;

    private static GameState gameState = null;
    protected GameState() {
        gameStateInfo = new String[4];

    }
    public static GameState getGameState() {
        if(gameState == null) {
            gameState = new GameState();
        }
        return gameState;
    }

    // Problem, multiplier, result, point
    public void changeState(String textInfo, int position){
        gameStateInfo[position] = textInfo;
        setChanged();
        notifyObservers(gameStateInfo);
    }

    public void changeCard(int cardNumber){
        setChanged();
        notifyObservers(cardNumber);
    }
}

